<?php
   include_once($_SERVER['DOCUMENT_ROOT']."/swo.cfg.php");
   include_once("$admin_path/cfg/pages.cfg.php");
   include_once("$admin_path/lib/access.php");
   include_once("$root_path/util/dbUtil.php");
   include_once("$root_path/cfg/dbTables.cfg.php");
  //Admin Page Controler
   $pageId = $_REQUEST["pageId"];
 
   if ($pageId == "")
        $pageId=0;
   
   //Creating Requied Objects
   $loginObj = new LoginManager();
   $dbUtilObj = new DBUtil();
   
   
   $loginStatus = $loginObj -> isLoggedIn();
   if ($loginStatus != true)
       $pageId=0;
	   
	   

   //Action Processing Logic
   $actionPage = $actionPage[$pageId];
   if ($actionPage == "")
   {
      $pageId=0;
   }
   
   $actionPage .= ".php";
    
   include_once("inner/action/$actionPage");
   
   header("Location: index.php?pageId=$pageId");

?>